<!-- @format -->

<script setup lang="ts">
import {ref} from 'vue';

// defineProps({
//     title: {
//         type: String,
//         default: '正在加载中...',
//     },
// });

const title = ref('正在加载中...');
const setTitle = (val: string) => {
    title.value = val;
};
defineExpose({
    setTitle,
});
</script>

<template>
    <div class="loading-box">
        <div class="loading-content">
            <i class="iconfont icon-ku" style="color: yellow"></i>
            <i class="iconfont icon-test"></i>
            <!-- <img src="./loading.gif" /> -->
            <p class="desc">{{ title }}</p>
        </div>
    </div>
</template>

<style lang="scss" scoped>
.loading-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    .loading-content {
        text-align: center;
        img {
            width: 35px !important;
            height: 35px !important;
        }
        .desc {
            line-height: 20px;
            font-size: 12px;
            color: #fff;
            position: relative;
        }
    }
}
</style>
